home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / gnustuff / tos / othergnu / texinf~1.zoo / texinfo.st / texi2roff / patches.st < prev    next >
Encoding:
Text File  |  1993-04-18  |  3.4 KB  |  148 lines

  1. diff -ur texi2roff/items.c ./items.c
  2. --- texi2roff/items.c    Mon Apr 12 17:41:07 1993
  3. +++ ./items.c    Sat Apr 17 16:12:35 1993
  4. @@ -21,10 +21,12 @@
  5.  char item[MAXILEVEL][MAXLINELEN];
  6.  
  7.  extern int  ilevel;
  8. +/**
  9.  extern char * gettoken();
  10.  extern char * eatwhitespace();
  11.  extern void errormsg();
  12.  extern struct tablerecd * lookup();
  13. +**/
  14.  
  15.  /*
  16.   * itemize - handle the itemizing start commands @enumerate, @itemize
  17. diff -ur texi2roff/table.c ./table.c
  18. --- texi2roff/table.c    Mon Apr 12 17:41:07 1993
  19. +++ ./table.c    Sat Apr 17 16:07:59 1993
  20. @@ -31,6 +31,7 @@
  21.  
  22.  struct misccmds * cmds;
  23.  struct tablerecd * table, * endoftable;
  24. +static void patchtable __PROTO((void));
  25.  
  26.  void
  27.  initialize(macropkg, showInfo, makeindex)
  28. @@ -38,7 +39,6 @@
  29.  int showInfo;
  30.  int makeindex;
  31.  {
  32. -    extern void patchtable();
  33.      int tablesize;
  34.  
  35.      switch (macropkg) {
  36. diff -ur texi2roff/texi2roff.c ./texi2roff.c
  37. --- texi2roff/texi2roff.c    Mon Apr 12 17:41:08 1993
  38. +++ ./texi2roff.c    Sat Apr 17 16:05:31 1993
  39. @@ -23,6 +23,7 @@
  40.   *    - initialize tables and other strings
  41.   *     - open files and pass them to process().
  42.   */
  43. +int
  44.  main(argc, argv)
  45.  int argc;
  46.  char *argv[];
  47. @@ -36,8 +37,11 @@
  48.  
  49.      extern int optind;
  50.      extern char *optarg;
  51. +#ifndef __STDC__
  52.      extern int process();
  53.      extern void initialize();
  54. +    extern int getopt();
  55. +#endif
  56.  
  57.      progname = argv[0];
  58.  
  59. @@ -109,7 +113,7 @@
  60.          if (in != stdin)
  61.          (void) fclose(in);
  62.      }
  63. -    exit(errflg);
  64. +    return(errflg);
  65.  }
  66.  
  67.  /*
  68. @@ -122,7 +126,9 @@
  69.      char *filename;
  70.  {
  71.      struct stat statbuf;
  72. +#ifndef __STDC__
  73.      extern int translate(/* FILE *, char * */);
  74. +#endif
  75.  
  76.      if (fstat(fileno(fp), &statbuf) != 0){
  77.      (void) fprintf(stderr,"%s : can't fstat file %s\n", progname, 
  78. diff -ur texi2roff/texi2roff.h ./texi2roff.h
  79. --- texi2roff/texi2roff.h    Mon Apr 12 17:41:08 1993
  80. +++ ./texi2roff.h    Sat Apr 17 16:11:33 1993
  81. @@ -71,3 +71,10 @@
  82.  #include <string.h>
  83.  #endif
  84.  
  85. +#include <stdlib.h>
  86. +#if HAVE_UNISTD
  87. +#include <unistd.h>
  88. +#else
  89. +#include <libc.h>
  90. +#endif
  91. +#include "proto.h"
  92. diff -ur texi2roff/translate.c ./translate.c
  93. --- texi2roff/translate.c    Mon Apr 12 17:41:09 1993
  94. +++ ./translate.c    Sat Apr 17 16:12:21 1993
  95. @@ -19,6 +19,7 @@
  96.  char    *filename;
  97.  char     *inp;            /* pointer into input buffer */
  98.  
  99. +#ifndef __STDC__
  100.  extern struct tablerecd * lookup();
  101.  
  102.  /* forward references */
  103. @@ -27,6 +28,7 @@
  104.  extern char * itemize();
  105.  extern char * doitem();
  106.  extern char * interpret();
  107. +#endif
  108.  
  109.  /*
  110.   * errormsg - print error messages to stderr
  111. @@ -158,7 +160,7 @@
  112.      struct tablerecd *tptr;
  113.      char        *s, *cp, tempstr[MAXLINELEN],itemtag[MAXLINELEN];
  114.      FILE        *fp;    /* for @include files */
  115. -    extern int        process();    /* for @include files */
  116. +    /* extern int        process(); */    /* for @include files */
  117.  
  118.      if (init == NO) {
  119.      (void) strcpy(fontstack[0], defaultfont);
  120. @@ -297,11 +299,13 @@
  121.          for (cp = tempstr; strchr(" \t\n",*s) == NULL; *cp++ = *s++)
  122.              ;
  123.          *cp = '\0';
  124. -        if (!discarding && ( fp = fopen(tempstr, "r")) == NULL)
  125. -            errormsg("can't open included file ", tempstr);
  126. -        else {
  127. -            (void) process(fp, tempstr);
  128. -            (void) fclose(fp);
  129. +        if (!discarding) {
  130. +            if (( fp = fopen(tempstr, "r")) == NULL)
  131. +            errormsg("can't open included file ", tempstr);
  132. +            else {
  133. +            (void) process(fp, tempstr);
  134. +            (void) fclose(fp);
  135. +            }
  136.          }
  137.          break;
  138.          default:
  139. @@ -347,7 +351,7 @@
  140.      set_vec[0] = 1;
  141.      inited_set = 1;
  142.      }
  143. -    while (set_vec[*str] == 0)
  144. +    while (set_vec[(unsigned char)*str] == 0)
  145.      ++str;
  146.      return str;
  147.  }
  148.